import $http from "../assets/js/http";

// 床位查询
export async function bed_select({
  RY_degsonid,
  RY_name,
  RY_department,
  SS_number,
  page
}) {
  return $http.post("Dorm/Dorm/bed_select", {
    RY_degsonid,
    RY_name,
    RY_department,
    SS_number,
    page
  });
}

// 调整床位
export async function bed_change({
  AR_number,
  SSL_number,
  SS_number, //房间号
  RY_bed, //床位号
  RY_degsonid //工号
}) {
  return $http.post("Dorm/Dorm/bed_change", {
    AR_number,
    SSL_number,
    SS_number,
    RY_bed,
    RY_degsonid
  });
}
//空余床位查询
export async function bed_select_people({ AR_number, SSL_number, SS_number }) {
  return $http.post("Dorm/Dorm/bed_select_people ", {
    AR_number,
    SSL_number,
    SS_number
  });
}
//编辑
export async function bed_update({
  RY_name,
  RY_degsonid,
  RY_phone,
  SQ_use,
  RY_remarks
}) {
  return $http.post("Dorm/Dorm/bed_update ", {
    RY_name,
    RY_degsonid,
    RY_phone,
    SQ_use,
    RY_remarks
  });
}

//已领用和未领用物品查询
export async function bed_article_select({ RY_name, SS_number, RY_bed }) {
  return $http.post("Article/Article/bed_article_select ", {
    RY_name,
    SS_number,
    RY_bed
  });
}
